<template>
    <div>
        <order-header :title="title">
            <span slot="tip">{{tip}}</span>
        </order-header>
        <router-view></router-view>
        <service></service>
        <nav-footer></nav-footer>
    </div>
</template>

<script>
    import OrderHeader from "../components/OrderHeader";
    import NavFooter from "../components/NavFooter";
    import Service from "../components/Service";

    export default {
        name: "Order",
        data() {
            return {
                title: '',
                tip: '',
            }
        },
        components: {
            OrderHeader,
            NavFooter,
            Service
        },
        mounted() {
            let path = this.$route.path;
            if (path === '/order/confirm') {
                this.title = '订单确认';
                this.tip = '请认真填写收货地址';
            }else if(path === '/order/list') {
                this.title = '订单列表';
                this.tip = '请谨防钓鱼链接或诈骗电话，了解更多>';
            }else if(path === '/order/pay') {
                this.title = '订单支付';
                this.tip = '请谨防钓鱼链接或诈骗电话，了解更多>';
            }else{
                this.title = '订单支付';
                this.tip = '请谨防钓鱼链接或诈骗电话，了解更多>';
            }
        }
    }
</script>

<style scoped>

</style>
